import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Role.GetRoleQuery',
    method: 'post',
    data,
  })
}

export function addRole(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Role.AddRole',
    method: 'post',
    data,
  })
}

export function doEdit(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Role.UpdateRole',
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Role.DeleteRole',
    method: 'post',
    data,
  })
}

export function doSwitch(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Role.ModifyRoleStatus',
    method: 'post',
    data,
  })
}

export function getRole(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Role.GetRoleDetail',
    method: 'post',
    data,
  })
}
